reverse each word in a string in c